package com.yc.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author kuakha
 * @since 2021-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BloodSugarPermission对象", description="权限表")
public class BloodSugarPermission extends Model<BloodSugarPermission> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "权限主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "权限对应院长id")
    private Integer deanId;

    @ApiModelProperty(value = "菜单名称")
    private String title;

    @ApiModelProperty(value = "父菜单ID，顶级菜单为0")
    private Integer parentId;

    @ApiModelProperty(value = "路由路径")
    private String path;

    @ApiModelProperty(value = "是否展示  1:true    0:false")
    private Boolean alwaysShow;

    @ApiModelProperty(value = "是否高亮")
    private String activeMenu;

    @ApiModelProperty(value = "重定向地址")
    private String redirect;

    @ApiModelProperty(value = "组件")
    private String component;

    @ApiModelProperty(value = "权限标识")
    private String roles;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "是否隐藏  true:显示  false:隐藏")
    private Boolean hidden;

    @ApiModelProperty(value = "排序")
    private Integer perOrder;

    @ApiModelProperty(value = "权限创建时间")
    private Date createTime;

    @ApiModelProperty(value = "权限更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "用户是否删除 0:未删除  1:已删除")
    private String isDelete;

    @ApiModelProperty(value = "客户端类型 0:pc端  1:app端")
    private String clientType;

    @TableField(exist = false)
    @ApiModelProperty(value = "meta 元标签")
    private Map<String,Object> meta;

    @TableField(exist = false)
    @ApiModelProperty(value = "权限列表")
    private List<BloodSugarPermission> children;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
